# 随机生成两个10以内的整数(要求不能重复), 让用户输入两个数的和, 判断正确与否
# 2021-8-2
# by : Nasa
import random
j=0
e=int(input('请输入题数:'))
for i in range(e):
    a=random.randint(1,10)
    b=random.randint(1,10)
    while a==b:
        # print('a==b')
        a=random.randint(1,10)
        b=random.randint(1,10)
    print('a是:',a,',b是:',b)
    c=a+b
    d=int(input('请输入a和b的和:'))
    if d==c:
        print('恭喜你!答对啦!')
        j=j+1
    else:
        print('答错啦!正确答案是:',c)
if j>e*0.7:
    print('太棒啦!你做对了',j,'道题!')
elif j<=e*0.7:
    print('要加油哦!,只答对了',j,'道题')
